package com.xueqi.service.impl;

import com.xueqi.bean.EbookEntry;
import com.xueqi.dao.EbookEntryDao;
import com.xueqi.dao.impl.EbookCategoryDaoImpl;
import com.xueqi.dao.impl.EbookEntryDaoImpl;
import com.xueqi.service.EbookEntryService;

import java.util.List;

public class EbookEntryServiceImpl implements EbookEntryService {
    private EbookEntryDao ebookEntryDao=new EbookEntryDaoImpl();
    @Override
    public List<EbookEntry> findall(int typeid,int pageindex,int pagesize) {
        return ebookEntryDao.findall(typeid,pageindex,pagesize);
    }

    @Override
    public int addBook(EbookEntry entry) {
        return ebookEntryDao.addBook(entry);
    }

    @Override
    public EbookEntry findbyid(int id) {
        return ebookEntryDao.findbyid(id);
    }

    @Override
    public int UpdateBook(EbookEntry entry) {
        return ebookEntryDao.UpdateBook(entry);
    }

    @Override
    public int DeleteBook(int tid) {
        return ebookEntryDao.DeleteBook(tid);
    }

    @Override
    public int totalcount(int typeid) {
        return ebookEntryDao.totalcount(typeid);
    }
}
